import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css';

import { start, registerMicroApps, setDefaultMountApp } from 'qiankun'

Vue.config.productionTip = false
Vue.use(ElementUI)

registerMicroApps([
  {
    name: 'App2',
    entry: '//localhost:4002',
    container: '#container',
    activeRule: '/base/app2',
  },
  {
    name: 'App3',
    entry: '//localhost:4003',
    container: '#container',
    activeRule: '/base/app3',
    props: {
      username: '赛罗'
    }
  }
])

// TODO 配置默认子应用
// setDefaultMountApp('/api3')

// TODO 启动 qiankun
// start()

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
